<?php
if (!defined('IN_ZWS')) exit();

class AddGroupModel extends Model {
	protected $tableName = 'Group_Group';
	protected $_validate = array(
		array('cname', 'require', '组别名不能为空！', 1),
		array('cname', 'checklen', '组别名长度过长！', 1, 'callback'),
		array('cname', '', '组别名已存在！', 1, 'unique'),
		);

	function checklen($data) {
		return strlen($data) > 10 ? false:true;
	} 

} 

?>